home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / PInterfaces / SCSI.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  50.7 KB  |  1,056 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        SCSI.p
  3.  
  4.      Contains:    SCSI Family Interfaces.
  5.  
  6.      Version:    Technology:    SCSI 4.3
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1986-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT SCSI;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __SCSI__}
  27. {$SETC __SCSI__ := 1}
  28.  
  29. {$I+}
  30. {$SETC SCSIIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __MIXEDMODE__}
  37. {$I MixedMode.p}
  38. {$ENDC}
  39.  
  40.  
  41. {$PUSH}
  42. {$ALIGN MAC68K}
  43. {$LibExport+}
  44.  
  45. { SCSI Manager errors. These are generated by Inside Mac IV calls only. }
  46.  
  47. CONST
  48.     scCommErr                    = 2;                            {  communications error, operation timeout  }
  49.     scArbNBErr                    = 3;                            {  arbitration timeout waiting for not BSY  }
  50.     scBadParmsErr                = 4;                            {  bad parameter or TIB opcode  }
  51.     scPhaseErr                    = 5;                            {  SCSI bus not in correct phase for attempted operation  }
  52.     scCompareErr                = 6;                            {  data compare error  }
  53.     scMgrBusyErr                = 7;                            {  SCSI Manager busy   }
  54.     scSequenceErr                = 8;                            {  attempted operation is out of sequence  }
  55.     scBusTOErr                    = 9;                            {  CPU bus timeout  }
  56.     scComplPhaseErr                = 10;                            {  SCSI bus wasn't in Status phase  }
  57.  
  58. { TIB opcodes }
  59.     scInc                        = 1;
  60.     scNoInc                        = 2;
  61.     scAdd                        = 3;
  62.     scMove                        = 4;
  63.     scLoop                        = 5;
  64.     scNop                        = 6;
  65.     scStop                        = 7;
  66.     scComp                        = 8;
  67.  
  68. { Signatures }
  69.     sbSIGWord                    = $4552;                        {  signature word for Block 0 ('ER')  }
  70.     sbMac                        = 1;                            {  system type for Mac  }
  71.     pMapSIG                        = $504D;                        {  partition map signature ('PM')  }
  72.     pdSigWord                    = $5453;
  73.  
  74.     oldPMSigWord                = $5453;
  75.     newPMSigWord                = $504D;
  76.  
  77. { Driver Descriptor Map }
  78.  
  79. TYPE
  80.     Block0Ptr = ^Block0;
  81.     Block0 = PACKED RECORD
  82.         sbSig:                    UInt16;                                    {  unique value for SCSI block 0  }
  83.         sbBlkSize:                UInt16;                                    {  block size of device  }
  84.         sbBlkCount:                UInt32;                                    {  number of blocks on device  }
  85.         sbDevType:                UInt16;                                    {  device type  }
  86.         sbDevId:                UInt16;                                    {  device id  }
  87.         sbData:                    UInt32;                                    {  not used  }
  88.         sbDrvrCount:            UInt16;                                    {  driver descriptor count  }
  89.         ddBlock:                UInt32;                                    {  1st driver's starting block  }
  90.         ddSize:                    UInt16;                                    {  size of 1st driver (512-byte blks)  }
  91.         ddType:                    UInt16;                                    {  system type (1 for Mac+)  }
  92.         ddPad:                    ARRAY [0..242] OF UInt16;                {  ARRAY[0..242] OF INTEGER; not used  }
  93.     END;
  94.  
  95. { Driver descriptor }
  96.     DDMapPtr = ^DDMap;
  97.     DDMap = RECORD
  98.         ddBlock:                UInt32;                                    {  1st driver's starting block  }
  99.         ddSize:                    UInt16;                                    {  size of 1st driver (512-byte blks)  }
  100.         ddType:                    UInt16;                                    {  system type (1 for Mac+)  }
  101.     END;
  102.  
  103. { Partition Map Entry }
  104.     PartitionPtr = ^Partition;
  105.     Partition = PACKED RECORD
  106.         pmSig:                    UInt16;                                    {  unique value for map entry blk  }
  107.         pmSigPad:                UInt16;                                    {  currently unused  }
  108.         pmMapBlkCnt:            UInt32;                                    {  # of blks in partition map  }
  109.         pmPyPartStart:            UInt32;                                    {  physical start blk of partition  }
  110.         pmPartBlkCnt:            UInt32;                                    {  # of blks in this partition  }
  111.         pmPartName:                PACKED ARRAY [0..31] OF UInt8;            {  ASCII partition name  }
  112.         pmParType:                PACKED ARRAY [0..31] OF UInt8;            {  ASCII partition type  }
  113.         pmLgDataStart:            UInt32;                                    {  log. # of partition's 1st data blk  }
  114.         pmDataCnt:                UInt32;                                    {  # of blks in partition's data area  }
  115.         pmPartStatus:            UInt32;                                    {  bit field for partition status  }
  116.         pmLgBootStart:            UInt32;                                    {  log. blk of partition's boot code  }
  117.         pmBootSize:                UInt32;                                    {  number of bytes in boot code  }
  118.         pmBootAddr:                UInt32;                                    {  memory load address of boot code  }
  119.         pmBootAddr2:            UInt32;                                    {  currently unused  }
  120.         pmBootEntry:            UInt32;                                    {  entry point of boot code  }
  121.         pmBootEntry2:            UInt32;                                    {  currently unused  }
  122.         pmBootCksum:            UInt32;                                    {  checksum of boot code  }
  123.         pmProcessor:            PACKED ARRAY [0..15] OF UInt8;            {  ASCII for the processor type  }
  124.         pmPad:                    ARRAY [0..187] OF UInt16;                {  ARRAY[0..187] OF INTEGER; not used  }
  125.     END;
  126.  
  127. { TIB instruction }
  128.     SCSIInstrPtr = ^SCSIInstr;
  129.     SCSIInstr = RECORD
  130.         scOpcode:                UInt16;
  131.         scParam1:                LONGINT;
  132.         scParam2:                LONGINT;
  133.     END;
  134.  
  135. { SCSI Phases (used by SIMs to support the Original SCSI Manager }
  136.  
  137. CONST
  138.     kDataOutPhase                = 0;                            {  Encoded MSG, C/D, I/O bits  }
  139.     kDataInPhase                = 1;
  140.     kCommandPhase                = 2;
  141.     kStatusPhase                = 3;
  142.     kPhaseIllegal0                = 4;
  143.     kPhaseIllegal1                = 5;
  144.     kMessageOutPhase            = 6;
  145.     kMessageInPhase                = 7;
  146.     kBusFreePhase                = 8;                            {  Additional Phases  }
  147.     kArbitratePhase                = 9;
  148.     kSelectPhase                = 10;
  149.     kMessageInPhaseNACK            = 11;                            {  Message In Phase with ACK hanging on the bus  }
  150.  
  151.  
  152. FUNCTION SCSIReset: OSErr;
  153.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  154.     INLINE $4267, $A815;
  155.     {$ENDC}
  156. FUNCTION SCSIGet: OSErr;
  157.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  158.     INLINE $3F3C, $0001, $A815;
  159.     {$ENDC}
  160. FUNCTION SCSISelect(targetID: INTEGER): OSErr;
  161.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  162.     INLINE $3F3C, $0002, $A815;
  163.     {$ENDC}
  164. FUNCTION SCSICmd(buffer: Ptr; count: INTEGER): OSErr;
  165.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  166.     INLINE $3F3C, $0003, $A815;
  167.     {$ENDC}
  168. FUNCTION SCSIRead(tibPtr: Ptr): OSErr;
  169.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  170.     INLINE $3F3C, $0005, $A815;
  171.     {$ENDC}
  172. FUNCTION SCSIRBlind(tibPtr: Ptr): OSErr;
  173.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  174.     INLINE $3F3C, $0008, $A815;
  175.     {$ENDC}
  176. FUNCTION SCSIWrite(tibPtr: Ptr): OSErr;
  177.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  178.     INLINE $3F3C, $0006, $A815;
  179.     {$ENDC}
  180. FUNCTION SCSIWBlind(tibPtr: Ptr): OSErr;
  181.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  182.     INLINE $3F3C, $0009, $A815;
  183.     {$ENDC}
  184. FUNCTION SCSIComplete(VAR stat: INTEGER; VAR message: INTEGER; wait: UInt32): OSErr;
  185.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  186.     INLINE $3F3C, $0004, $A815;
  187.     {$ENDC}
  188. FUNCTION SCSIStat: INTEGER;
  189.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  190.     INLINE $3F3C, $000A, $A815;
  191.     {$ENDC}
  192. FUNCTION SCSISelAtn(targetID: INTEGER): OSErr;
  193.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  194.     INLINE $3F3C, $000B, $A815;
  195.     {$ENDC}
  196. FUNCTION SCSIMsgIn(VAR message: INTEGER): OSErr;
  197.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  198.     INLINE $3F3C, $000C, $A815;
  199.     {$ENDC}
  200. FUNCTION SCSIMsgOut(message: INTEGER): OSErr;
  201.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  202.     INLINE $3F3C, $000D, $A815;
  203.     {$ENDC}
  204.  
  205.  
  206. CONST
  207.     scsiVERSION                    = 43;
  208.  
  209.  
  210. {
  211.  * SCSI Callback Procedure Prototypes. Several of these are only callable
  212.  * from SCSI Manager 4.3 SIM and XPT contexts. 
  213.  }
  214.  
  215. TYPE
  216. {$IFC TYPED_FUNCTION_POINTERS}
  217.     AENCallbackProcPtr = PROCEDURE; C;
  218. {$ELSEC}
  219.     AENCallbackProcPtr = ProcPtr;
  220. {$ENDC}
  221.  
  222. {$IFC TYPED_FUNCTION_POINTERS}
  223.     SIMInitProcPtr = FUNCTION(SIMinfoPtr: Ptr): OSErr; C;
  224. {$ELSEC}
  225.     SIMInitProcPtr = ProcPtr;
  226. {$ENDC}
  227.  
  228. {$IFC TYPED_FUNCTION_POINTERS}
  229.     SIMActionProcPtr = PROCEDURE(scsiPB: UNIV Ptr; SIMGlobals: Ptr); C;
  230. {$ELSEC}
  231.     SIMActionProcPtr = ProcPtr;
  232. {$ENDC}
  233.  
  234. {$IFC TYPED_FUNCTION_POINTERS}
  235.     SCSIProcPtr = PROCEDURE; C;
  236. {$ELSEC}
  237.     SCSIProcPtr = ProcPtr;
  238. {$ENDC}
  239.  
  240. {$IFC TYPED_FUNCTION_POINTERS}
  241.     SCSIMakeCallbackProcPtr = PROCEDURE(scsiPB: UNIV Ptr); C;
  242. {$ELSEC}
  243.     SCSIMakeCallbackProcPtr = ProcPtr;
  244. {$ENDC}
  245.  
  246. { SCSIInterruptPollProcPtr is obsolete (use SCSIInterruptProcPtr) but still here for compatibility }
  247. {$IFC TYPED_FUNCTION_POINTERS}
  248.     SCSIInterruptPollProcPtr = FUNCTION(SIMGlobals: Ptr): LONGINT; C;
  249. {$ELSEC}
  250.     SCSIInterruptPollProcPtr = ProcPtr;
  251. {$ENDC}
  252.  
  253. {$IFC TYPED_FUNCTION_POINTERS}
  254.     SCSIInterruptProcPtr = FUNCTION(SIMGlobals: Ptr): LONGINT; C;
  255. {$ELSEC}
  256.     SCSIInterruptProcPtr = ProcPtr;
  257. {$ENDC}
  258.  
  259.     AENCallbackUPP = UniversalProcPtr;
  260.     SIMInitUPP = UniversalProcPtr;
  261.     SIMActionUPP = UniversalProcPtr;
  262.     SCSIUPP = UniversalProcPtr;
  263.     SCSIMakeCallbackUPP = UniversalProcPtr;
  264.     SCSIInterruptPollUPP = UniversalProcPtr;
  265.     SCSIInterruptUPP = UniversalProcPtr;
  266. {$IFC TYPED_FUNCTION_POINTERS}
  267.     SCSICallbackProcPtr = PROCEDURE(scsiPB: UNIV Ptr);
  268. {$ELSEC}
  269.     SCSICallbackProcPtr = ProcPtr;
  270. {$ENDC}
  271.  
  272.     SCSICallbackUPP = UniversalProcPtr;
  273.  
  274. CONST
  275.     uppAENCallbackProcInfo = $00000001;
  276.     uppSIMInitProcInfo = $000000E1;
  277.     uppSIMActionProcInfo = $000003C1;
  278.     uppSCSIProcInfo = $00000001;
  279.     uppSCSIMakeCallbackProcInfo = $000000C1;
  280.     uppSCSIInterruptPollProcInfo = $000000F1;
  281.     uppSCSIInterruptProcInfo = $000000F1;
  282.     uppSCSICallbackProcInfo = $000000C0;
  283.  
  284. FUNCTION NewAENCallbackProc(userRoutine: AENCallbackProcPtr): AENCallbackUPP;
  285.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  286.     INLINE $2E9F;
  287.     {$ENDC}
  288.  
  289. FUNCTION NewSIMInitProc(userRoutine: SIMInitProcPtr): SIMInitUPP;
  290.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  291.     INLINE $2E9F;
  292.     {$ENDC}
  293.  
  294. FUNCTION NewSIMActionProc(userRoutine: SIMActionProcPtr): SIMActionUPP;
  295.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  296.     INLINE $2E9F;
  297.     {$ENDC}
  298.  
  299. FUNCTION NewSCSIProc(userRoutine: SCSIProcPtr): SCSIUPP;
  300.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  301.     INLINE $2E9F;
  302.     {$ENDC}
  303.  
  304. FUNCTION NewSCSIMakeCallbackProc(userRoutine: SCSIMakeCallbackProcPtr): SCSIMakeCallbackUPP;
  305.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  306.     INLINE $2E9F;
  307.     {$ENDC}
  308.  
  309. FUNCTION NewSCSIInterruptPollProc(userRoutine: SCSIInterruptPollProcPtr): SCSIInterruptPollUPP;
  310.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  311.     INLINE $2E9F;
  312.     {$ENDC}
  313.  
  314. FUNCTION NewSCSIInterruptProc(userRoutine: SCSIInterruptProcPtr): SCSIInterruptUPP;
  315.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  316.     INLINE $2E9F;
  317.     {$ENDC}
  318.  
  319. FUNCTION NewSCSICallbackProc(userRoutine: SCSICallbackProcPtr): SCSICallbackUPP;
  320.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  321.     INLINE $2E9F;
  322.     {$ENDC}
  323.  
  324. PROCEDURE CallAENCallbackProc(userRoutine: AENCallbackUPP);
  325.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  326.     {To be implemented:  Glue to move parameters into registers.}
  327.     {$ENDC}
  328.  
  329. FUNCTION CallSIMInitProc(SIMinfoPtr: Ptr; userRoutine: SIMInitUPP): OSErr;
  330.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  331.     {To be implemented:  Glue to move parameters into registers.}
  332.     {$ENDC}
  333.  
  334. PROCEDURE CallSIMActionProc(scsiPB: UNIV Ptr; SIMGlobals: Ptr; userRoutine: SIMActionUPP);
  335.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  336.     {To be implemented:  Glue to move parameters into registers.}
  337.     {$ENDC}
  338.  
  339. PROCEDURE CallSCSIProc(userRoutine: SCSIUPP);
  340.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  341.     {To be implemented:  Glue to move parameters into registers.}
  342.     {$ENDC}
  343.  
  344. PROCEDURE CallSCSIMakeCallbackProc(scsiPB: UNIV Ptr; userRoutine: SCSIMakeCallbackUPP);
  345.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  346.     {To be implemented:  Glue to move parameters into registers.}
  347.     {$ENDC}
  348.  
  349. FUNCTION CallSCSIInterruptPollProc(SIMGlobals: Ptr; userRoutine: SCSIInterruptPollUPP): LONGINT;
  350.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  351.     {To be implemented:  Glue to move parameters into registers.}
  352.     {$ENDC}
  353.  
  354. FUNCTION CallSCSIInterruptProc(SIMGlobals: Ptr; userRoutine: SCSIInterruptUPP): LONGINT;
  355.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  356.     {To be implemented:  Glue to move parameters into registers.}
  357.     {$ENDC}
  358.  
  359. PROCEDURE CallSCSICallbackProc(scsiPB: UNIV Ptr; userRoutine: SCSICallbackUPP);
  360.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  361.     INLINE $205F, $4E90;
  362.     {$ENDC}
  363. { SCSI Manager 4.3 function codes }
  364.  
  365. CONST
  366.     SCSINop                        = $00;                            {  Execute nothing                                          }
  367.     SCSIExecIO                    = $01;                            {  Execute the specified IO                              }
  368.     SCSIBusInquiry                = $03;                            {  Get parameters for entire path of HBAs                  }
  369.     SCSIReleaseQ                = $04;                            {  Release the frozen SIM queue for particular LUN          }
  370.     SCSIAbortCommand            = $10;                            {  Abort the selected Control Block                       }
  371.     SCSIResetBus                = $11;                            {  Reset the SCSI bus                                       }
  372.     SCSIResetDevice                = $12;                            {  Reset the SCSI device                                   }
  373.     SCSITerminateIO                = $13;                            {  Terminate any pending IO                               }
  374.     SCSIGetVirtualIDInfo        = $80;                            {  Find out which bus old ID is on                          }
  375.     SCSILoadDriver                = $82;                            {  Load a driver for a device ident                      }
  376.     SCSIOldCall                    = $84;                            {  XPT->SIM private call for old-API                      }
  377.     SCSICreateRefNumXref        = $85;                            {  Register a DeviceIdent to drvr RefNum xref              }
  378.     SCSILookupRefNumXref        = $86;                            {  Get DeviceIdent to drvr RefNum xref                      }
  379.     SCSIRemoveRefNumXref        = $87;                            {  Remove a DeviceIdent to drvr RefNum xref              }
  380.     SCSIRegisterWithNewXPT        = $88;                            {  XPT has changed - SIM needs to re-register itself      }
  381.     vendorUnique                = $C0;                            {  0xC0 thru 0xFF  }
  382.  
  383.  
  384. { Allocation length defines for some of the fields }
  385.     handshakeDataLength            = 8;                            {  Handshake data length  }
  386.     maxCDBLength                = 16;                            {  Space for the CDB bytes/pointer  }
  387.     vendorIDLength                = 16;                            {  ASCII string len for Vendor ID   }
  388.  
  389. { Define DeviceIdent structure }
  390.  
  391. TYPE
  392.     DeviceIdentPtr = ^DeviceIdent;
  393.     DeviceIdent = PACKED RECORD
  394.         diReserved:                UInt8;                                    {  reserved                  }
  395.         bus:                    UInt8;                                    {  SCSI - Bus Number         }
  396.         targetID:                UInt8;                                    {  SCSI - Target SCSI ID     }
  397.         LUN:                    UInt8;                                    {  SCSI - LUN                   }
  398.     END;
  399.  
  400. { Command Descriptor Block structure }
  401.     CDBPtr = ^CDB;
  402.     CDB = RECORD
  403.         CASE INTEGER OF
  404.         0: (
  405.             cdbPtr:                BytePtr;                                {  pointer to the CDB, or  }
  406.             );
  407.         1: (
  408.             cdbBytes:            PACKED ARRAY [0..15] OF UInt8;            {  the actual CDB to send  }
  409.             );
  410.     END;
  411.  
  412. { Scatter/gather list element (Deprecated for MacOS8) }
  413.     SGRecordPtr = ^SGRecord;
  414.     SGRecord = RECORD
  415.         SGAddr:                    Ptr;
  416.         SGCount:                UInt32;
  417.     END;
  418.  
  419.     SCSIHdrPtr = ^SCSIHdr;
  420.     SCSIHdr = RECORD
  421.         qLink:                    SCSIHdrPtr;                                {  (internal use, must be nil on entry)     }
  422.         scsiReserved1:            INTEGER;                                {  ->     reserved for input                 }
  423.         scsiPBLength:            UInt16;                                    {  -> Length of the entire PB             }
  424.         scsiFunctionCode:        SInt8;                                    {  -> function selector                  }
  425.         scsiReserved2:            SInt8;                                    {  <-     reserved for output                 }
  426.         scsiResult:                OSErr;                                    {  <- Returned result                      }
  427.         scsiDevice:                DeviceIdent;                            {  -> Device Identifier (bus+target+lun) }
  428.         scsiCompletion:            SCSICallbackUPP;                        {  -> Callback on completion function       }
  429.         scsiFlags:                UInt32;                                    {  -> assorted flags                     }
  430.         scsiDriverStorage:        BytePtr;                                {  <> Ptr for driver private use         }
  431.         scsiXPTprivate:            Ptr;                                    {  private field for use in XPT             }
  432.         scsiReserved3:            LONGINT;                                {  reserved                                 }
  433.     END;
  434.  
  435.     SCSI_PBPtr = ^SCSI_PB;
  436.     SCSI_PB = RECORD
  437.         qLink:                    SCSIHdrPtr;                                {  (internal use, must be nil on entry)     }
  438.         scsiReserved1:            INTEGER;                                {  ->     reserved for input                 }
  439.         scsiPBLength:            UInt16;                                    {  -> Length of the entire PB             }
  440.         scsiFunctionCode:        SInt8;                                    {  -> function selector                  }
  441.         scsiReserved2:            SInt8;                                    {  <-     reserved for output                 }
  442.         scsiResult:                OSErr;                                    {  <- Returned result                      }
  443.         scsiDevice:                DeviceIdent;                            {  -> Device Identifier (bus+target+lun) }
  444.         scsiCompletion:            SCSICallbackUPP;                        {  -> Callback on completion function       }
  445.         scsiFlags:                UInt32;                                    {  -> assorted flags                     }
  446.         scsiDriverStorage:        BytePtr;                                {  <> Ptr for driver private use         }
  447.         scsiXPTprivate:            Ptr;                                    {  private field for use in XPT             }
  448.         scsiReserved3:            LONGINT;                                {  reserved                                 }
  449.     END;
  450.  
  451.     SCSI_IOPtr = ^SCSI_IO;
  452.     SCSI_IO = RECORD
  453.         qLink:                    SCSIHdrPtr;                                {  (internal use, must be nil on entry)     }
  454.         scsiReserved1:            INTEGER;                                {  ->     reserved for input                 }
  455.         scsiPBLength:            UInt16;                                    {  -> Length of the entire PB             }
  456.         scsiFunctionCode:        SInt8;                                    {  -> function selector                  }
  457.         scsiReserved2:            SInt8;                                    {  <-     reserved for output                 }
  458.         scsiResult:                OSErr;                                    {  <- Returned result                      }
  459.         scsiDevice:                DeviceIdent;                            {  -> Device Identifier (bus+target+lun) }
  460.         scsiCompletion:            SCSICallbackUPP;                        {  -> Callback on completion function       }
  461.         scsiFlags:                UInt32;                                    {  -> assorted flags                     }
  462.         scsiDriverStorage:        BytePtr;                                {  <> Ptr for driver private use         }
  463.         scsiXPTprivate:            Ptr;                                    {  private field for use in XPT             }
  464.         scsiReserved3:            LONGINT;                                {  reserved                                 }
  465.         scsiResultFlags:        UInt16;                                    {  <- Flags which modify the scsiResult field         }
  466.         scsiReserved3pt5:        UInt16;                                    {  -> Reserved                                         }
  467.         scsiDataPtr:            BytePtr;                                {  -> Pointer to the data buffer or the S/G list       }
  468.         scsiDataLength:            UInt32;                                    {  -> Data transfer length                             }
  469.         scsiSensePtr:            BytePtr;                                {  -> Ptr to autosense data buffer                   }
  470.         scsiSenseLength:        SInt8;                                    {  -> size of the autosense buffer                      }
  471.         scsiCDBLength:            SInt8;                                    {  -> Number of bytes for the CDB                       }
  472.         scsiSGListCount:        UInt16;                                    {  -> num of scatter gather list entries               }
  473.         scsiReserved4:            UInt32;                                    {  <-     reserved for output                             }
  474.         scsiSCSIstatus:            SInt8;                                    {  <- Returned scsi device status                       }
  475.         scsiSenseResidual:        SInt8;                                    {  <- Autosense residual length                       }
  476.         scsiReserved5:            UInt16;                                    {  <-     reserved for output                              }
  477.         scsiDataResidual:        LONGINT;                                {  <- Returned Transfer residual length               }
  478.         scsiCDB:                CDB;                                    {  -> Actual CDB or pointer to CDB                   }
  479.         scsiTimeout:            LONGINT;                                {  -> Timeout value (Time Mgr format) (CAM timeout)  }
  480.         scsiReserved5pt5:        BytePtr;                                {  -> Reserved                                         }
  481.         scsiReserved5pt6:        UInt16;                                    {  -> Reserved                                         }
  482.         scsiIOFlags:            UInt16;                                    {  -> additional I/O flags                                }
  483.         scsiTagAction:            SInt8;                                    {  -> What to do for tag queuing                        }
  484.         scsiReserved6:            SInt8;                                    {  ->     reserved for input                              }
  485.         scsiReserved7:            UInt16;                                    {  ->     reserved for input                              }
  486.         scsiSelectTimeout:        UInt16;                                    {  -> Select timeout value                              }
  487.         scsiDataType:            SInt8;                                    {  -> Data description type (i.e. buffer, TIB, S/G)     }
  488.         scsiTransferType:        SInt8;                                    {  -> Transfer type (i.e. Blind vs Polled)              }
  489.         scsiReserved8:            UInt32;                                    {  ->     reserved for input                              }
  490.         scsiReserved9:            UInt32;                                    {  ->     reserved for input                              }
  491.         scsiHandshake:            ARRAY [0..7] OF UInt16;                    {  -> handshaking points (null term'd)     }
  492.         scsiReserved10:            UInt32;                                    {  ->     reserved for input                              }
  493.         scsiReserved11:            UInt32;                                    {  ->   reserved for input                             }
  494.         scsiCommandLink:        SCSI_IOPtr;                                {  -> Ptr to the next PB in linked cmd chain          }
  495.         scsiSIMpublics:            PACKED ARRAY [0..7] OF UInt8;            {  ->     reserved for input to 3rd-party SIMs         }
  496.         scsiAppleReserved6:        PACKED ARRAY [0..7] OF UInt8;            {  ->    reserved for input                               }
  497.                                                                         {  XPT layer privates (for old-API emulation)  }
  498.         scsiCurrentPhase:        UInt16;                                    {  <- phase upon completing old call                   }
  499.         scsiSelector:            INTEGER;                                {  -> selector specified in old calls                   }
  500.         scsiOldCallResult:        OSErr;                                    {  <- result of old call                               }
  501.         scsiSCSImessage:        SInt8;                                    {  <- Returned scsi device message (for SCSIComplete) }
  502.         XPTprivateFlags:        SInt8;                                    {  <> various flags                                    }
  503.         XPTextras:                PACKED ARRAY [0..11] OF UInt8;            {                                                      }
  504.     END;
  505.  
  506.     SCSIExecIOPB                        = SCSI_IO;
  507.     SCSIExecIOPBPtr                     = ^SCSIExecIOPB;
  508. { Bus inquiry PB }
  509.     SCSIBusInquiryPBPtr = ^SCSIBusInquiryPB;
  510.     SCSIBusInquiryPB = RECORD
  511.         qLink:                    SCSIHdrPtr;                                {  (internal use, must be nil on entry)     }
  512.         scsiReserved1:            INTEGER;                                {  ->     reserved for input                 }
  513.         scsiPBLength:            UInt16;                                    {  -> Length of the entire PB             }
  514.         scsiFunctionCode:        SInt8;                                    {  -> function selector                  }
  515.         scsiReserved2:            SInt8;                                    {  <-     reserved for output                 }
  516.         scsiResult:                OSErr;                                    {  <- Returned result                      }
  517.         scsiDevice:                DeviceIdent;                            {  -> Device Identifier (bus+target+lun) }
  518.         scsiCompletion:            SCSICallbackUPP;                        {  -> Callback on completion function       }
  519.         scsiFlags:                UInt32;                                    {  -> assorted flags                     }
  520.         scsiDriverStorage:        BytePtr;                                {  <> Ptr for driver private use         }
  521.         scsiXPTprivate:            Ptr;                                    {  private field for use in XPT             }
  522.         scsiReserved3:            LONGINT;                                {  reserved                                 }
  523.         scsiEngineCount:        UInt16;                                    {  <- Number of engines on HBA                          }
  524.         scsiMaxTransferType:    UInt16;                                    {  <- Number of transfer types for this HBA             }
  525.         scsiDataTypes:            UInt32;                                    {  <- which data types are supported by this SIM      }
  526.         scsiIOpbSize:            UInt16;                                    {  <- Size of SCSI_IO PB for this SIM/HBA              }
  527.         scsiMaxIOpbSize:        UInt16;                                    {  <- Size of max SCSI_IO PB for all SIM/HBAs          }
  528.         scsiFeatureFlags:        UInt32;                                    {  <- Supported features flags field                  }
  529.         scsiVersionNumber:        SInt8;                                    {  <- Version number for the SIM/HBA                  }
  530.         scsiHBAInquiry:            SInt8;                                    {  <- Mimic of INQ byte 7 for the HBA                  }
  531.         scsiTargetModeFlags:    SInt8;                                    {  <- Flags for target mode support                  }
  532.         scsiScanFlags:            SInt8;                                    {  <- Scan related feature flags                      }
  533.         scsiSIMPrivatesPtr:        UInt32;                                    {  <- Ptr to SIM private data area                      }
  534.         scsiSIMPrivatesSize:    UInt32;                                    {  <- Size of SIM private data area                  }
  535.         scsiAsyncFlags:            UInt32;                                    {  <- Event cap. for Async Callback                  }
  536.         scsiHiBusID:            SInt8;                                    {  <- Highest path ID in the subsystem               }
  537.         scsiInitiatorID:        SInt8;                                    {  <- ID of the HBA on the SCSI bus                  }
  538.         scsiBIReserved0:        UInt16;                                    {                                                      }
  539.         scsiBIReserved1:        UInt32;                                    {  <-                                                   }
  540.         scsiFlagsSupported:        UInt32;                                    {  <- which scsiFlags are supported                  }
  541.         scsiIOFlagsSupported:    UInt16;                                    {  <- which scsiIOFlags are supported                  }
  542.         scsiWeirdStuff:            UInt16;                                    {  <-                                                  }
  543.         scsiMaxTarget:            UInt16;                                    {  <- maximum Target number supported                  }
  544.         scsiMaxLUN:                UInt16;                                    {  <- maximum Logical Unit number supported          }
  545.         scsiSIMVendor:            PACKED ARRAY [0..15] OF CHAR;            {  <- Vendor ID of SIM (or XPT if bus<FF)          }
  546.         scsiHBAVendor:            PACKED ARRAY [0..15] OF CHAR;            {  <- Vendor ID of the HBA                          }
  547.         scsiControllerFamily:    PACKED ARRAY [0..15] OF CHAR;            {  <- Family of SCSI Controller                  }
  548.         scsiControllerType:        PACKED ARRAY [0..15] OF CHAR;            {  <- Specific Model of SCSI Controller used      }
  549.         scsiXPTversion:            PACKED ARRAY [0..3] OF CHAR;            {  <- version number of XPT                          }
  550.         scsiSIMversion:            PACKED ARRAY [0..3] OF CHAR;            {  <- version number of SIM                          }
  551.         scsiHBAversion:            PACKED ARRAY [0..3] OF CHAR;            {  <- version number of HBA                          }
  552.         scsiHBAslotType:        SInt8;                                    {  <- type of "slot" that this HBA is in             }
  553.         scsiHBAslotNumber:        SInt8;                                    {  <- slot number of this HBA                          }
  554.         scsiSIMsRsrcID:            UInt16;                                    {  <- resource ID of this SIM                          }
  555.         scsiBIReserved3:        UInt16;                                    {  <-                                                  }
  556.         scsiAdditionalLength:    UInt16;                                    {  <- additional BusInquiry PB len                     }
  557.     END;
  558.  
  559. { Abort SIM Request PB }
  560.     SCSIAbortCommandPBPtr = ^SCSIAbortCommandPB;
  561.     SCSIAbortCommandPB = RECORD
  562.         qLink:                    SCSIHdrPtr;                                {  (internal use, must be nil on entry)     }
  563.         scsiReserved1:            INTEGER;                                {  ->     reserved for input                 }
  564.         scsiPBLength:            UInt16;                                    {  -> Length of the entire PB             }
  565.         scsiFunctionCode:        SInt8;                                    {  -> function selector                  }
  566.         scsiReserved2:            SInt8;                                    {  <-     reserved for output                 }
  567.         scsiResult:                OSErr;                                    {  <- Returned result                      }
  568.         scsiDevice:                DeviceIdent;                            {  -> Device Identifier (bus+target+lun) }
  569.         scsiCompletion:            SCSICallbackUPP;                        {  -> Callback on completion function       }
  570.         scsiFlags:                UInt32;                                    {  -> assorted flags                     }
  571.         scsiDriverStorage:        BytePtr;                                {  <> Ptr for driver private use         }
  572.         scsiXPTprivate:            Ptr;                                    {  private field for use in XPT             }
  573.         scsiReserved3:            LONGINT;                                {  reserved                                 }
  574.         scsiIOptr:                SCSI_IOPtr;                                {  Pointer to the PB to abort             }
  575.     END;
  576.  
  577. { Terminate I/O Process Request PB }
  578.     SCSITerminateIOPBPtr = ^SCSITerminateIOPB;
  579.     SCSITerminateIOPB = RECORD
  580.         qLink:                    SCSIHdrPtr;                                {  (internal use, must be nil on entry)     }
  581.         scsiReserved1:            INTEGER;                                {  ->     reserved for input                 }
  582.         scsiPBLength:            UInt16;                                    {  -> Length of the entire PB             }
  583.         scsiFunctionCode:        SInt8;                                    {  -> function selector                  }
  584.         scsiReserved2:            SInt8;                                    {  <-     reserved for output                 }
  585.         scsiResult:                OSErr;                                    {  <- Returned result                      }
  586.         scsiDevice:                DeviceIdent;                            {  -> Device Identifier (bus+target+lun) }
  587.         scsiCompletion:            SCSICallbackUPP;                        {  -> Callback on completion function       }
  588.         scsiFlags:                UInt32;                                    {  -> assorted flags                     }
  589.         scsiDriverStorage:        BytePtr;                                {  <> Ptr for driver private use         }
  590.         scsiXPTprivate:            Ptr;                                    {  private field for use in XPT             }
  591.         scsiReserved3:            LONGINT;                                {  reserved                                 }
  592.         scsiIOptr:                SCSI_IOPtr;                                {  Pointer to the PB to terminate          }
  593.     END;
  594.  
  595. { Reset SCSI Bus PB }
  596.     SCSIResetBusPBPtr = ^SCSIResetBusPB;
  597.     SCSIResetBusPB = RECORD
  598.         qLink:                    SCSIHdrPtr;                                {  (internal use, must be nil on entry)     }
  599.         scsiReserved1:            INTEGER;                                {  ->     reserved for input                 }
  600.         scsiPBLength:            UInt16;                                    {  -> Length of the entire PB             }
  601.         scsiFunctionCode:        SInt8;                                    {  -> function selector                  }
  602.         scsiReserved2:            SInt8;                                    {  <-     reserved for output                 }
  603.         scsiResult:                OSErr;                                    {  <- Returned result                      }
  604.         scsiDevice:                DeviceIdent;                            {  -> Device Identifier (bus+target+lun) }
  605.         scsiCompletion:            SCSICallbackUPP;                        {  -> Callback on completion function       }
  606.         scsiFlags:                UInt32;                                    {  -> assorted flags                     }
  607.         scsiDriverStorage:        BytePtr;                                {  <> Ptr for driver private use         }
  608.         scsiXPTprivate:            Ptr;                                    {  private field for use in XPT             }
  609.         scsiReserved3:            LONGINT;                                {  reserved                                 }
  610.     END;
  611.  
  612. { Reset SCSI Device PB }
  613.     SCSIResetDevicePBPtr = ^SCSIResetDevicePB;
  614.     SCSIResetDevicePB = RECORD
  615.         qLink:                    SCSIHdrPtr;                                {  (internal use, must be nil on entry)     }
  616.         scsiReserved1:            INTEGER;                                {  ->     reserved for input                 }
  617.         scsiPBLength:            UInt16;                                    {  -> Length of the entire PB             }
  618.         scsiFunctionCode:        SInt8;                                    {  -> function selector                  }
  619.         scsiReserved2:            SInt8;                                    {  <-     reserved for output                 }
  620.         scsiResult:                OSErr;                                    {  <- Returned result                      }
  621.         scsiDevice:                DeviceIdent;                            {  -> Device Identifier (bus+target+lun) }
  622.         scsiCompletion:            SCSICallbackUPP;                        {  -> Callback on completion function       }
  623.         scsiFlags:                UInt32;                                    {  -> assorted flags                     }
  624.         scsiDriverStorage:        BytePtr;                                {  <> Ptr for driver private use         }
  625.         scsiXPTprivate:            Ptr;                                    {  private field for use in XPT             }
  626.         scsiReserved3:            LONGINT;                                {  reserved                                 }
  627.     END;
  628.  
  629. { Release SIM Queue PB }
  630.     SCSIReleaseQPBPtr = ^SCSIReleaseQPB;
  631.     SCSIReleaseQPB = RECORD
  632.         qLink:                    SCSIHdrPtr;                                {  (internal use, must be nil on entry)     }
  633.         scsiReserved1:            INTEGER;                                {  ->     reserved for input                 }
  634.         scsiPBLength:            UInt16;                                    {  -> Length of the entire PB             }
  635.         scsiFunctionCode:        SInt8;                                    {  -> function selector                  }
  636.         scsiReserved2:            SInt8;                                    {  <-     reserved for output                 }
  637.         scsiResult:                OSErr;                                    {  <- Returned result                      }
  638.         scsiDevice:                DeviceIdent;                            {  -> Device Identifier (bus+target+lun) }
  639.         scsiCompletion:            SCSICallbackUPP;                        {  -> Callback on completion function       }
  640.         scsiFlags:                UInt32;                                    {  -> assorted flags                     }
  641.         scsiDriverStorage:        BytePtr;                                {  <> Ptr for driver private use         }
  642.         scsiXPTprivate:            Ptr;                                    {  private field for use in XPT             }
  643.         scsiReserved3:            LONGINT;                                {  reserved                                 }
  644.     END;
  645.  
  646. { SCSI Get Virtual ID Info PB }
  647.     SCSIGetVirtualIDInfoPBPtr = ^SCSIGetVirtualIDInfoPB;
  648.     SCSIGetVirtualIDInfoPB = RECORD
  649.         qLink:                    SCSIHdrPtr;                                {  (internal use, must be nil on entry)     }
  650.         scsiReserved1:            INTEGER;                                {  ->     reserved for input                 }
  651.         scsiPBLength:            UInt16;                                    {  -> Length of the entire PB             }
  652.         scsiFunctionCode:        SInt8;                                    {  -> function selector                  }
  653.         scsiReserved2:            SInt8;                                    {  <-     reserved for output                 }
  654.         scsiResult:                OSErr;                                    {  <- Returned result                      }
  655.         scsiDevice:                DeviceIdent;                            {  -> Device Identifier (bus+target+lun) }
  656.         scsiCompletion:            SCSICallbackUPP;                        {  -> Callback on completion function       }
  657.         scsiFlags:                UInt32;                                    {  -> assorted flags                     }
  658.         scsiDriverStorage:        Ptr;                                    {  <> Ptr for driver private use         }
  659.         scsiXPTprivate:            Ptr;                                    {  private field for use in XPT             }
  660.         scsiReserved3:            LONGINT;                                {  reserved                                 }
  661.         scsiOldCallID:            UInt16;                                    {  -> SCSI ID of device in question      }
  662.         scsiExists:                BOOLEAN;                                {  <- true if device exists              }
  663.         filler:                    SInt8;
  664.     END;
  665.  
  666. { Create/Lookup/Remove RefNum for Device PB }
  667.     SCSIDriverPBPtr = ^SCSIDriverPB;
  668.     SCSIDriverPB = RECORD
  669.         qLink:                    SCSIHdrPtr;                                {  (internal use, must be nil on entry)     }
  670.         scsiReserved1:            INTEGER;                                {  ->     reserved for input                 }
  671.         scsiPBLength:            UInt16;                                    {  -> Length of the entire PB             }
  672.         scsiFunctionCode:        SInt8;                                    {  -> function selector                  }
  673.         scsiReserved2:            SInt8;                                    {  <-     reserved for output                 }
  674.         scsiResult:                OSErr;                                    {  <- Returned result                      }
  675.         scsiDevice:                DeviceIdent;                            {  -> Device Identifier (bus+target+lun) }
  676.         scsiCompletion:            SCSICallbackUPP;                        {  -> Callback on completion function       }
  677.         scsiFlags:                UInt32;                                    {  -> assorted flags                     }
  678.         scsiDriverStorage:        Ptr;                                    {  <> Ptr for driver private use         }
  679.         scsiXPTprivate:            Ptr;                                    {  private field for use in XPT             }
  680.         scsiReserved3:            LONGINT;                                {  reserved                                 }
  681.         scsiDriver:                INTEGER;                                {  -> DriverRefNum, For SetDriver, <- For GetNextDriver  }
  682.         scsiDriverFlags:        UInt16;                                    {  <> Details of driver/device              }
  683.         scsiNextDevice:            DeviceIdent;                            {  <- DeviceIdent of the NEXT Item in the list   }
  684.     END;
  685.  
  686. { Load Driver PB }
  687.     SCSILoadDriverPBPtr = ^SCSILoadDriverPB;
  688.     SCSILoadDriverPB = RECORD
  689.         qLink:                    SCSIHdrPtr;                                {  (internal use, must be nil on entry)     }
  690.         scsiReserved1:            INTEGER;                                {  ->     reserved for input                 }
  691.         scsiPBLength:            UInt16;                                    {  -> Length of the entire PB             }
  692.         scsiFunctionCode:        SInt8;                                    {  -> function selector                  }
  693.         scsiReserved2:            SInt8;                                    {  <-     reserved for output                 }
  694.         scsiResult:                OSErr;                                    {  <- Returned result                      }
  695.         scsiDevice:                DeviceIdent;                            {  -> Device Identifier (bus+target+lun) }
  696.         scsiCompletion:            SCSICallbackUPP;                        {  -> Callback on completion function       }
  697.         scsiFlags:                UInt32;                                    {  -> assorted flags                     }
  698.         scsiDriverStorage:        Ptr;                                    {  <> Ptr for driver private use         }
  699.         scsiXPTprivate:            Ptr;                                    {  private field for use in XPT             }
  700.         scsiReserved3:            LONGINT;                                {  reserved                                 }
  701.         scsiLoadedRefNum:        INTEGER;                                {  <- SIM returns refnum of driver          }
  702.         scsiDiskLoadFailed:        BOOLEAN;                                {  -> if true, indicates call after failure to load  }
  703.         filler:                    SInt8;
  704.     END;
  705.  
  706.  
  707. { Defines for the scsiTransferType field }
  708.  
  709. CONST
  710.     scsiTransferBlind            = 0;
  711.     scsiTransferPolled            = 1;
  712.  
  713.     scsiErrorBase                = -7936;
  714.  
  715.     scsiRequestInProgress        = 1;                            {  1     = PB request is in progress              }
  716.                                                                 {  Execution failed  00-2F  }
  717.     scsiRequestAborted            = -7934;                        {  -7934 = PB request aborted by the host          }
  718.     scsiUnableToAbort            = -7933;                        {  -7933 = Unable to Abort PB request              }
  719.     scsiNonZeroStatus            = -7932;                        {  -7932 = PB request completed with an err      }
  720.     scsiUnused05                = -7931;                        {  -7931 =                                       }
  721.     scsiUnused06                = -7930;                        {  -7930 =                                       }
  722.     scsiUnused07                = -7929;                        {  -7929 =                                       }
  723.     scsiUnused08                = -7928;                        {  -7928 =                                       }
  724.     scsiUnableToTerminate        = -7927;                        {  -7927 = Unable to Terminate I/O PB req          }
  725.     scsiSelectTimeout            = -7926;                        {  -7926 = Target selection timeout              }
  726.     scsiCommandTimeout            = -7925;                        {  -7925 = Command timeout                       }
  727.     scsiIdentifyMessageRejected    = -7924;                        {  -7924 =                                       }
  728.     scsiMessageRejectReceived    = -7923;                        {  -7923 = Message reject received                  }
  729.     scsiSCSIBusReset            = -7922;                        {  -7922 = SCSI bus reset sent/received          }
  730.     scsiParityError                = -7921;                        {  -7921 = Uncorrectable parity error occured      }
  731.     scsiAutosenseFailed            = -7920;                        {  -7920 = Autosense: Request sense cmd fail      }
  732.     scsiUnused11                = -7919;                        {  -7919 =                                       }
  733.     scsiDataRunError            = -7918;                        {  -7918 = Data overrun/underrun error           }
  734.     scsiUnexpectedBusFree        = -7917;                        {  -7917 = Unexpected BUS free                      }
  735.     scsiSequenceFailed            = -7916;                        {  -7916 = Target bus phase sequence failure      }
  736.     scsiWrongDirection            = -7915;                        {  -7915 = Data phase was in wrong direction      }
  737.     scsiUnused16                = -7914;                        {  -7914 =                                       }
  738.     scsiBDRsent                    = -7913;                        {  -7913 = A SCSI BDR msg was sent to target      }
  739.     scsiTerminated                = -7912;                        {  -7912 = PB request terminated by the host      }
  740.     scsiNoNexus                    = -7911;                        {  -7911 = Nexus is not established              }
  741.     scsiCDBReceived                = -7910;                        {  -7910 = The SCSI CDB has been received          }
  742.                                                                 {  Couldn't begin execution  30-3F  }
  743.     scsiTooManyBuses            = -7888;                        {  -7888 = Register failed because we're full     }
  744.     scsiBusy                    = -7887;                        {  -7887 = SCSI subsystem is busy                  }
  745.     scsiProvideFail                = -7886;                        {  -7886 = Unable to provide requ. capability     }
  746.     scsiDeviceNotThere            = -7885;                        {  -7885 = SCSI device not installed/there       }
  747.     scsiNoHBA                    = -7884;                        {  -7884 = No HBA detected Error                  }
  748.     scsiDeviceConflict            = -7883;                        {  -7883 = sorry, max 1 refNum per DeviceIdent      }
  749.     scsiNoSuchXref                = -7882;                        {  -7882 = no such RefNum xref                      }
  750.     scsiQLinkInvalid            = -7881;                        {  -7881 = pre-linked PBs not supported             }
  751.                                                                 {    (The QLink field was nonzero)                 }
  752.                                                                 {  Parameter errors  40-7F  }
  753.     scsiPBLengthError            = -7872;                        {  -7872 = (scsiPBLength is insuf'ct/invalid      }
  754.     scsiFunctionNotAvailable    = -7871;                        {  -7871 = The requ. func is not available       }
  755.     scsiRequestInvalid            = -7870;                        {  -7870 = PB request is invalid                  }
  756.     scsiBusInvalid                = -7869;                        {  -7869 = Bus ID supplied is invalid               }
  757.     scsiTIDInvalid                = -7868;                        {  -7868 = Target ID supplied is invalid          }
  758.     scsiLUNInvalid                = -7867;                        {  -7867 = LUN supplied is invalid               }
  759.     scsiIDInvalid                = -7866;                        {  -7866 = The initiator ID is invalid           }
  760.     scsiDataTypeInvalid            = -7865;                        {  -7865 = scsiDataType requested not supported  }
  761.     scsiTransferTypeInvalid        = -7864;                        {  -7864 = scsiTransferType field is too high      }
  762.     scsiCDBLengthInvalid        = -7863;                        {  -7863 = scsiCDBLength field is too big          }
  763.  
  764. { New errors for SCSI Family         }
  765.     scsiUnused74                = -7862;                        {  -7862 =                                           }
  766.     scsiUnused75                = -7861;                        {  -7861 =                                          }
  767.     scsiBadDataLength            = -7860;                        {  -7860 = a zero data length in PB              }
  768.     scsiPartialPrepared            = -7859;                        {  -7859 = could not do full prepare mem for I/O }
  769.     scsiInvalidMsgType            = -7858;                        {  -7858 = Invalid message type (internal)         }
  770.     scsiUnused79                = -7857;                        {  -7857 =                                            }
  771.     scsiBadConnID                = -7856;                        {  -7856 = Bad Connection ID                       }
  772.     scsiUnused81                = -7855;                        {  -7855 =                                          }
  773.     scsiIOInProgress            = -7854;                        {  -7854 = Can't close conn, IO in prog             }
  774.     scsiTargetReserved            = -7853;                        {  -7853 = Target already reserved                 }
  775.     scsiUnused84                = -7852;                        {  -7852 =                                          }
  776.     scsiUnused85                = -7851;                        {  -7851 =                                          }
  777.     scsiBadConnType                = -7850;                        {  -7850 = Bad connection type                     }
  778.     scsiCannotLoadPlugin        = -7849;                        {  -7849 = No matching service category             }
  779.  
  780. { +++ }
  781. {
  782.  * scsiFamilyInternalError and scsiPluginInternalError are intended to handle consistency check failures.
  783.  * For example, if the family stores a record on a lookaside queue, but does not find that record
  784.  * it can use this error to report this failure. SCSI Manager 4.3 uses dsIOCoreErr in a few places,
  785.  * but this is probably not the best error. In general, internal errors should be reported as bugs.
  786.  *
  787.  * The following range of errors is provided for third-party (non-Apple) SCSI SIM and device driver vendors.
  788.  * In general, they would be used for error conditions that are not covered by the standardized errors.
  789.  * They should not normally be conveyed to normal applications, but might be used for communication between
  790.  * a plug-in and a vendor-provided device driver (for example, to manage RAID hot-swapping).
  791.  *
  792.  * Note: I don't know how many SCSI errors are reserved in the error code architecture. Don't assume that
  793.  * we'll actually get sixteen, but we should reserve at least one.
  794.  }
  795.     scsiFamilyInternalError        = -7849;                        {  -7849 = Internal consistency check failed     }
  796.     scsiPluginInternalError        = -7848;                        {  -7848 = Internal consistency check failed     }
  797.     scsiVendorSpecificErrorBase    = -7808;                        {  ??    = Start of third-party error range         }
  798.     scsiVendorSpecificErrorCount = 16;                            {  Number of third-party errors                     }
  799.  
  800. { --- }
  801.     scsiExecutionErrors            = -7936;
  802.     scsiNotExecutedErrors        = -7888;
  803.     scsiParameterErrors            = -7872;
  804.  
  805. { Defines for the scsiResultFlags field }
  806.     scsiSIMQFrozen                = $0001;                        {  The SIM queue is frozen w/this err             }
  807.     scsiAutosenseValid            = $0002;                        {  Autosense data valid for target               }
  808.     scsiBusNotFree                = $0004;                        {  At time of callback, SCSI bus is not free     }
  809.  
  810. { Defines for the bit numbers of the scsiFlags field in the PB header for the SCSIExecIO function }
  811.     kbSCSIDisableAutosense        = 29;                            {  Disable auto sense feature                      }
  812.     kbSCSIFlagReservedA            = 28;                            {                                                }
  813.     kbSCSIFlagReserved0            = 27;                            {                                                }
  814.     kbSCSICDBLinked                = 26;                            {  The PB contains a linked CDB                     }
  815.     kbSCSIQEnable                = 25;                            {  Target queue actions are enabled                 }
  816.     kbSCSICDBIsPointer            = 24;                            {  The CDB field contains a pointer                 }
  817.     kbSCSIFlagReserved1            = 23;                            {                                                   }
  818.     kbSCSIInitiateSyncData        = 22;                            {  Attempt Sync data xfer and SDTR                 }
  819.     kbSCSIDisableSyncData        = 21;                            {  Disable sync, go to async                     }
  820.     kbSCSISIMQHead                = 20;                            {  Place PB at the head of SIM Q                 }
  821.     kbSCSISIMQFreeze            = 19;                            {  Return the SIM Q to frozen state                 }
  822.     kbSCSISIMQNoFreeze            = 18;                            {  Disallow SIM Q freezing                         }
  823.     kbSCSIDoDisconnect            = 17;                            {  Definitely do disconnect                         }
  824.     kbSCSIDontDisconnect        = 16;                            {  Definitely don't disconnect                     }
  825.     kbSCSIDataReadyForDMA        = 15;                            {  Data buffer(s) are ready for DMA                 }
  826.     kbSCSIFlagReserved3            = 14;                            {                                                   }
  827.     kbSCSIDataPhysical            = 13;                            {  SG/Buffer data ptrs are physical                 }
  828.     kbSCSISensePhysical            = 12;                            {  Autosense buffer ptr is physical                 }
  829.     kbSCSIFlagReserved5            = 11;                            {                                                   }
  830.     kbSCSIFlagReserved6            = 10;                            {                                                   }
  831.     kbSCSIFlagReserved7            = 9;                            {                                                   }
  832.     kbSCSIFlagReserved8            = 8;                            {                                                   }
  833.     kbSCSIDataBufferValid        = 7;                            {  Data buffer valid                             }
  834.     kbSCSIStatusBufferValid        = 6;                            {  Status buffer valid                              }
  835.     kbSCSIMessageBufferValid    = 5;                            {  Message buffer valid                             }
  836.     kbSCSIFlagReserved9            = 4;                            {                                                }
  837.  
  838. { Defines for the bit masks of the scsiFlags field }
  839.     scsiDirectionMask            = $C0000000;                    {  Data direction mask                         }
  840.     scsiDirectionNone            = $C0000000;                    {  Data direction (11: no data)                 }
  841.     scsiDirectionReserved        = $00000000;                    {  Data direction (00: reserved)             }
  842.     scsiDirectionOut            = $80000000;                    {  Data direction (10: DATA OUT)             }
  843.     scsiDirectionIn                = $40000000;                    {  Data direction (01: DATA IN)                 }
  844.     scsiDisableAutosense        = $20000000;                    {  Disable auto sense feature                 }
  845.     scsiFlagReservedA            = $10000000;                    {                                               }
  846.     scsiFlagReserved0            = $08000000;                    {                                               }
  847.     scsiCDBLinked                = $04000000;                    {  The PB contains a linked CDB                 }
  848.     scsiQEnable                    = $02000000;                    {  Target queue actions are enabled             }
  849.     scsiCDBIsPointer            = $01000000;                    {  The CDB field contains a pointer             }
  850.     scsiFlagReserved1            = $00800000;                    {                                               }
  851.     scsiInitiateSyncData        = $00400000;                    {  Attempt Sync data xfer and SDTR             }
  852.     scsiDisableSyncData            = $00200000;                    {  Disable sync, go to async                 }
  853.     scsiSIMQHead                = $00100000;                    {  Place PB at the head of SIM Q             }
  854.     scsiSIMQFreeze                = $00080000;                    {  Return the SIM Q to frozen state             }
  855.     scsiSIMQNoFreeze            = $00040000;                    {  Disallow SIM Q freezing                     }
  856.     scsiDoDisconnect            = $00020000;                    {  Definitely do disconnect                     }
  857.     scsiDontDisconnect            = $00010000;                    {  Definitely don't disconnect                 }
  858.     scsiDataReadyForDMA            = $00008000;                    {  Data buffer(s) are ready for DMA             }
  859.     scsiFlagReserved3            = $00004000;                    {    }
  860.     scsiDataPhysical            = $00002000;                    {  SG/Buffer data ptrs are physical             }
  861.     scsiSensePhysical            = $00001000;                    {  Autosense buffer ptr is physical             }
  862.     scsiFlagReserved5            = $00000800;                    {                                            }
  863.     scsiFlagReserved6            = $00000400;                    {                                               }
  864.     scsiFlagReserved7            = $00000200;                    {                                               }
  865.     scsiFlagReserved8            = $00000100;                    {                                               }
  866.  
  867. { bit masks for the scsiIOFlags field in SCSIExecIOPB }
  868.     scsiNoParityCheck            = $0002;                        {  disable parity checking                              }
  869.     scsiDisableSelectWAtn        = $0004;                        {  disable select w/Atn                               }
  870.     scsiSavePtrOnDisconnect        = $0008;                        {  do SaveDataPointer upon Disconnect msg              }
  871.     scsiNoBucketIn                = $0010;                        {  don’t bit bucket in during this I/O                  }
  872.     scsiNoBucketOut                = $0020;                        {  don’t bit bucket out during this I/O              }
  873.     scsiDisableWide                = $0040;                        {  disable wide transfer negotiation                  }
  874.     scsiInitiateWide            = $0080;                        {  initiate wide transfer negotiation                  }
  875.     scsiRenegotiateSense        = $0100;                        {  renegotiate sync/wide before issuing autosense      }
  876.     scsiDisableDiscipline        = $0200;                        {  disable parameter checking on SCSIExecIO calls     }
  877.     scsiIOFlagReserved0080        = $0080;                        {                                                    }
  878.     scsiIOFlagReserved8000        = $8000;                        {                                                       }
  879.  
  880. { Defines for the Bus Inquiry PB fields. }
  881. { scsiHBAInquiry field bits }
  882.     scsiBusMDP                    = $80;                            {  Supports Modify Data Pointer message                         }
  883.     scsiBusWide32                = $40;                            {  Supports 32 bit wide SCSI                                 }
  884.     scsiBusWide16                = $20;                            {  Supports 16 bit wide SCSI                                 }
  885.     scsiBusSDTR                    = $10;                            {  Supports Sync Data Transfer Req message                     }
  886.     scsiBusLinkedCDB            = $08;                            {  Supports linked CDBs                                         }
  887.     scsiBusTagQ                    = $02;                            {  Supports tag queue message                                 }
  888.     scsiBusSoftReset            = $01;                            {  Supports soft reset                                         }
  889.  
  890. { Defines for the scsiDataType field }
  891.     scsiDataBuffer                = 0;                            {  single contiguous buffer supplied                   }
  892.     scsiDataTIB                    = 1;                            {  TIB supplied (ptr in scsiDataPtr)                  }
  893.     scsiDataSG                    = 2;                            {  scatter/gather list supplied                       }
  894.     scsiDataIOTable                = 3;                            { #(7/11/95) Prepared by Block Storage               }
  895.  
  896. { scsiDataTypes field bits  }
  897. {    bits 0->15 Apple-defined, 16->30 3rd-party unique, 31 = reserved }
  898.     scsiBusDataTIB                = $02;                            {  TIB supplied (ptr in scsiDataPtr)         }
  899.     scsiBusDataBuffer            = $01;                            {  single contiguous buffer supplied          }
  900.     scsiBusDataSG                = $04;                            {  scatter/gather list supplied              }
  901.     scsiBusDataIOTable            = $08;                            {  (2/6/95) Prepare Memory for IO }
  902.     scsiBusDataReserved            = $80000000;                    {                                             }
  903.  
  904. { scsiScanFlags field bits }
  905.     scsiBusScansDevices            = $80;                            {  Bus scans for and maintains device list             }
  906.     scsiBusScansOnInit            = $40;                            {  Bus scans performed at power-up/reboot             }
  907.     scsiBusLoadsROMDrivers        = $20;                            {  may load ROM drivers to support targets              }
  908.  
  909. { scsiFeatureFlags field bits }
  910.     scsiBusLVD                    = $00000400;                    {  HBA is Low Voltage Differential Bus             }
  911.     scsiBusUltra3SCSI            = $00000200;                    {  HBA supports Ultra3 SCSI                         }
  912.     scsiBusUltra2SCSI            = $00000100;                    {  HBA supports Ultra2 SCSI                         }
  913.     scsiBusInternalExternalMask    = $000000C0;                    {  bus internal/external mask                     }
  914.     scsiBusInternalExternalUnknown = $00000000;                    {  not known whether bus is inside or outside      }
  915.     scsiBusInternalExternal        = $000000C0;                    {  bus goes inside and outside the box              }
  916.     scsiBusInternal                = $00000080;                    {  bus goes inside the box                          }
  917.     scsiBusExternal                = $00000040;                    {  bus goes outside the box                      }
  918.     scsiBusCacheCoherentDMA        = $00000020;                    {  DMA is cache coherent                          }
  919.     scsiBusOldCallCapable        = $00000010;                    {  SIM is old call capable                          }
  920.     scsiBusUltraSCSI            = $00000008;                    {  HBA supports Ultra SCSI                         }
  921.     scsiBusDifferential            = $00000004;                    {  Single Ended (0) or Differential (1)          }
  922.     scsiBusFastSCSI                = $00000002;                    {  HBA supports fast SCSI                          }
  923.     scsiBusDMAavailable            = $00000001;                    {  DMA is available                              }
  924.  
  925. { scsiWeirdStuff field bits }
  926.     scsiOddDisconnectUnsafeRead1 = $0001;                        {  Disconnects on odd byte boundries are unsafe with DMA and/or blind reads  }
  927.     scsiOddDisconnectUnsafeWrite1 = $0002;                        {  Disconnects on odd byte boundries are unsafe with DMA and/or blind writes  }
  928.     scsiBusErrorsUnsafe            = $0004;                        {  Non-handshaked delays or disconnects during blind transfers may cause a crash  }
  929.     scsiRequiresHandshake        = $0008;                        {  Non-handshaked delays or disconnects during blind transfers may cause data corruption  }
  930.     scsiTargetDrivenSDTRSafe    = $0010;                        {  Targets which initiate synchronous negotiations are supported  }
  931.     scsiOddCountForPhysicalUnsafe = $0020;                        {  If using physical addrs all counts must be even, and disconnects must be on even boundries  }
  932.     scsiAbortCmdFixed            = $0040;                        {  Set if abort command is fixed to properly make callbacks  }
  933.     scsiMeshACKTimingFixed        = $0080;                        {  Set if bug allowing Mesh to release ACK prematurely is fixed  }
  934.  
  935. { scsiHBAslotType values }
  936.     scsiMotherboardBus            = $00;                            {  A built in Apple supplied bus                      }
  937.     scsiNuBus                    = $01;                            {  A SIM on a NuBus card                              }
  938.     scsiPDSBus                    = $03;                            {     "  on a PDS card                                 }
  939.     scsiPCIBus                    = $04;                            {     "  on a PCI bus card                             }
  940.     scsiPCMCIABus                = $05;                            {     "  on a PCMCIA card                             }
  941.     scsiFireWireBridgeBus        = $06;                            {     "  connected through a FireWire bridge         }
  942.  
  943. { Defines for the scsiDriverFlags field (in SCSIDriverPB) }
  944.     scsiDeviceSensitive            = $0001;                        {  Only driver should access this device                 }
  945.     scsiDeviceNoOldCallAccess    = $0002;                        {  no old call access to this device                      }
  946.  
  947. {  SIMInitInfo PB }
  948. { directions are for SCSIRegisterBus call ( -> parm, <- result)             }
  949.  
  950. TYPE
  951.     SIMInitInfoPtr = ^SIMInitInfo;
  952.     SIMInitInfo = RECORD
  953.         SIMstaticPtr:            Ptr;                                    {  <- alloc. ptr to the SIM's static vars                  }
  954.         staticSize:                LONGINT;                                {  -> num bytes SIM needs for static vars                  }
  955.         SIMInit:                SIMInitUPP;                                {  -> pointer to the SIM init routine                      }
  956.         SIMAction:                SIMActionUPP;                            {  -> pointer to the SIM action routine                  }
  957.         SIM_ISR:                SCSIInterruptUPP;                        {        reserved                                              }
  958.         SIMInterruptPoll:        SCSIInterruptUPP;                        {  -> pointer to the SIM interrupt poll routine             }
  959.         NewOldCall:                SIMActionUPP;                            {  -> pointer to the SIM NewOldCall routine                 }
  960.         ioPBSize:                UInt16;                                    {  -> size of SCSI_IO_PBs required for this SIM             }
  961.         oldCallCapable:            BOOLEAN;                                {  -> true if this SIM can handle old-API calls             }
  962.         simInfoUnused1:            SInt8;                                    {        reserved                                             }
  963.         simInternalUse:            LONGINT;                                {  xx not affected or viewed by XPT                         }
  964.         XPT_ISR:                SCSIUPP;                                {     reserved                                             }
  965.         EnteringSIM:            SCSIUPP;                                {  <- ptr to the EnteringSIM routine                     }
  966.         ExitingSIM:                SCSIUPP;                                {  <- ptr to the ExitingSIM routine                         }
  967.         MakeCallback:            SCSIMakeCallbackUPP;                    {  <- the XPT layer’s SCSIMakeCallback routine             }
  968.         busID:                    UInt16;                                    {  <- bus number for the registered bus                     }
  969.         simSlotNumber:            SInt8;                                    {  <- Magic cookie to place in scsiHBASlotNumber (PCI)     }
  970.         simSRsrcID:                SInt8;                                    {  <- Magic cookie to place in scsiSIMsRsrcID     (PCI)     }
  971.         simRegEntry:            Ptr;                                    {  -> The SIM's RegEntryIDPtr                     (PCI)     }
  972.     END;
  973.  
  974. { Glue between SCSI calls and SCSITrap format }
  975.  
  976. CONST
  977.     xptSCSIAction                = $0001;
  978.     xptSCSIRegisterBus            = $0002;
  979.     xptSCSIDeregisterBus        = $0003;
  980.     xptSCSIReregisterBus        = $0004;
  981.     xptSCSIKillXPT                = $0005;                        {  kills Mini-XPT after transition  }
  982.     xptSCSIInitialize            = $000A;                        {  Initialize the SCSI manager  }
  983.  
  984. {
  985.  * SCSI bus status. These values are returned by the SCSI target in the status phase.
  986.  * They are not related to Macintosh status values (except that values other than
  987.  * scsiStatusGood will result in scsiResult set to scsiNonZeroStatus).
  988.  }
  989.     scsiStatGood                = $00;                            {  Good Status }
  990.     scsiStatCheckCondition        = $02;                            {  Check Condition }
  991.     scsiStatConditionMet        = $04;                            {  Condition Met }
  992.     scsiStatBusy                = $08;                            {  Busy }
  993.     scsiStatIntermediate        = $10;                            {  Intermediate }
  994.     scsiStatIntermedMet            = $14;                            {  Intermediate - Condition Met }
  995.     scsiStatResvConflict        = $18;                            {  Reservation conflict }
  996.     scsiStatTerminated            = $22;                            {  Command terminated }
  997.     scsiStatQFull                = $28;                            {  Queue full }
  998.  
  999. {  SCSI messages }
  1000.     kCmdCompleteMsg                = 0;
  1001.     kExtendedMsg                = 1;                            {  0x01 }
  1002.     kSaveDataPointerMsg            = 2;                            {  0x02 }
  1003.     kRestorePointersMsg            = 3;                            {  0x03 }
  1004.     kDisconnectMsg                = 4;                            {  0x04 }
  1005.     kInitiatorDetectedErrorMsg    = 5;                            {  0x05 }
  1006.     kAbortMsg                    = 6;                            {  0x06 }
  1007.     kMsgRejectMsg                = 7;                            {  0x07 }
  1008.     kNoOperationMsg                = 8;                            {  0x08 }
  1009.     kMsgParityErrorMsg            = 9;                            {  0x09 }
  1010.     kLinkedCmdCompleteMsg        = 10;                            {  0x0a }
  1011.     kLinkedCmdCompleteWithFlagMsg = 11;                            {  0x0b }
  1012.     kBusDeviceResetMsg            = 12;                            {  0x0c }
  1013.     kAbortTagMsg                = 13;                            {  0x0d }
  1014.     kClearQueueMsg                = 14;                            {  0x0e }
  1015.     kInitiateRecoveryMsg        = 15;                            {  0x0f }
  1016.     kReleaseRecoveryMsg            = 16;                            {  0x10 }
  1017.     kTerminateIOProcessMsg        = 17;                            {  0x11 }
  1018.     kSimpleQueueTag                = $20;                            {  0x20 }
  1019.     kHeadOfQueueTagMsg            = $21;                            {  0x21 }
  1020.     kOrderedQueueTagMsg            = $22;                            {  0x22 }
  1021.     kIgnoreWideResidueMsg        = $23;                            {  0x23 }
  1022.  
  1023.  
  1024. { moveq #kSCSIx, D0;  _SCSIAtomic }
  1025. FUNCTION SCSIAction(VAR parameterBlock: SCSI_PB): OSErr;
  1026.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1027.     INLINE $205F, $7001, $A089, $3E80;
  1028.     {$ENDC}
  1029. FUNCTION SCSIRegisterBus(VAR parameterBlock: SIMInitInfo): OSErr;
  1030.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1031.     INLINE $205F, $7002, $A089, $3E80;
  1032.     {$ENDC}
  1033. FUNCTION SCSIDeregisterBus(VAR parameterBlock: SCSI_PB): OSErr;
  1034.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1035.     INLINE $205F, $7003, $A089, $3E80;
  1036.     {$ENDC}
  1037. FUNCTION SCSIReregisterBus(VAR parameterBlock: SIMInitInfo): OSErr;
  1038.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1039.     INLINE $205F, $7004, $A089, $3E80;
  1040.     {$ENDC}
  1041. FUNCTION SCSIKillXPT(VAR parameterBlock: SIMInitInfo): OSErr;
  1042.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1043.     INLINE $205F, $7005, $A089, $3E80;
  1044.     {$ENDC}
  1045.  
  1046. {$ALIGN RESET}
  1047. {$POP}
  1048.  
  1049. {$SETC UsingIncludes := SCSIIncludes}
  1050.  
  1051. {$ENDC} {__SCSI__}
  1052.  
  1053. {$IFC NOT UsingIncludes}
  1054.  END.
  1055. {$ENDC}
  1056.